
import React, { memo, useCallback } from 'react'
import MeModel from '@models/meModel'
// @ts-ignore
import Styles from './index.scss'
import WImage from '@components/global/image'
// @ts-ignore
import FormIcon from '../../../icons/form.svg'
import { WingBlank } from 'antd-mobile';

interface PropsInterface {
  meModel: MeModel
}
// @ts-ignore
const MeTop = (props: PropsInterface) => {

  /**
   * 下载简历
   */
  const downLoadJianLi = useCallback(() => {
    window.open(props.meModel.home_jianli)
  }, [])

  return (
    <div className={Styles['com-me-top']}>
      <WImage
        className={ Styles['icon'] }
        url={props.meModel.home_icon}
        width={200}
        height={200}>
          <FormIcon onClick={ downLoadJianLi } className={ `${Styles['jian-li']} w-round` }/>
        </WImage>
        <WingBlank size="lg">
          <p className={ `${Styles['title']} w-text-center` }>{ props.meModel.home_title }</p>
        </WingBlank>
    </div>
  )
}

export default memo(MeTop)